import 'package:distribution_mall_flutter/generated/json/address_search_entity.g.dart';
import 'package:distribution_mall_flutter/generated/json/base/json_field.dart';
import 'dart:convert';
export 'package:distribution_mall_flutter/generated/json/delete_account_check_entity.g.dart';

@JsonSerializable()
class AddressSearchBody {
  AddressSearchBodyAddress? firstAddress;
  AddressSearchBodyAddress? secondAddress;
  AddressSearchBodyAddress? thirdAddress;
  AddressSearchBodyAddress? fourthAddress;

  AddressSearchBody();

  factory AddressSearchBody.fromJson(Map<String, dynamic> json) =>
      $AddressSearchBodyFromJson(json);

  Map<String, dynamic> toJson() => $AddressSearchBodyToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class AddressSearchBodyAddress {
  late String code;
  late String virtualPostcode;
  late String name;
  late String type;
  String? postcode;
  late bool leafNode;

  AddressSearchBodyAddress();

  factory AddressSearchBodyAddress.fromJson(Map<String, dynamic> json) =>
      $AddressSearchBodyAddressFromJson(json);

  Map<String, dynamic> toJson() => $AddressSearchBodyAddressToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
